﻿using System.Collections.Generic;

namespace Hicap.QRCodeWarehouse.Core.Common
{
    /// <summary>
    /// Signalr method channel
    /// </summary>
    public static class NotificationMethod
    {
        public const string Connected = "Connected";
        public const string MonitorFeedBack = MessageQueueChanelConst.MonitorServiceFeedBack;
        public const string GenerationTaskFeedBack = MessageQueueChanelConst.CodeGenServiceFeedBack;
        public const string TakenFileFeedBack = MessageQueueChanelConst.CodeTakenServiceFeedBack;
        public const string ImportFeedBack = MessageQueueChanelConst.CodeGenServiceImportFeedBack;

        public static Dictionary<string, List<string>> AllowNotificationConfig { get; } = new Dictionary<string, List<string>>()
        {
            {SpeicaAuthCode.WarhouseMonitor,new List<string>()
            {
                MonitorFeedBack,
                MonitorFeedBack+".End"
            } },
            {SpeicaAuthCode.GenerationTask,new List<string>()
            {
                GenerationTaskFeedBack,
                GenerationTaskFeedBack+".End"
            } },
            {SpeicaAuthCode.FileRepository,new List<string>()
            {
                TakenFileFeedBack,
                TakenFileFeedBack+".End",
                ImportFeedBack,
                ImportFeedBack+".End"
            } }
        };
    }
}